package UnitTest;

import Service.Impl.LogImpl;
import Service.Impl.TestBeanImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application {
    public static void main(String[] args) {
        //加载xml配置
        ApplicationContext context =
                new ClassPathXmlApplicationContext("Application-Content.xml");
        //IOC获取Bean
        TestBeanImpl testBeanService = (TestBeanImpl) context.getBean("testBeanService");
        testBeanService.hello();

        LogImpl log = (LogImpl) context.getBean("testLogService");
        log.hello();
    }
}
